#include "app.h"
#include "main.h"
#include "usb_com.h"
#include "my_timer.h"
#include "func_adc.h"
#include "func_uart.h"
struct my_timer led_time;

void led_loop(void* p)
{
    static unsigned char on = 0;
    on=!on;
	  //usb_send("123",3);
    HAL_GPIO_WritePin(GPIOC,GPIO_PIN_13,on);
}
void app_init()
{
    // TODO: 用户程序初始化
    timer_register_set(&led_time,1000,0,0,led_loop,0,1);
    uart_rec_start();
    adc_init();
}

void app_loop()
{
    // TODO:用户程序轮询
	timer_thread();
}
